﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace C_
{
    internal class Program
    {
       
        static void Main()
        {
            List<IAsyncResult> list = new List<IAsyncResult>();
            for (int i = 0; i < 5; i++)
            {
                list.Add(new Action(() =>
                {
                    A.GetA().Print();
                }).BeginInvoke(null, null));
            }
            //Thread.Sleep(1000);
            List<IAsyncResult> list1 = new List<IAsyncResult>();
            for (int i = 0; i < 5; i++)
            {
                list1.Add(new Action(() =>
                {
                    B.GetA().Print();
                }).BeginInvoke(null, null));
            }
        }
    }
}
